The present invention relates to a numerical controller used to control a machine tool, automatic assembly apparatus and an automatic carrier, and in particular to a method for executing a motion program assumed when the execution environment for the motion program is located outside the numerical controller, such as an a personal computer or a programmable controller.
The invention also relates to a numerical controller used to control a machine tool, automatic assembly apparatus and an automatic carrier, and in particular to a method for defining a control signal for controlling activation/termination of a motion program.
For a conventional art numerical controller whose motion program execution environment exists externally, in case motion command data used for the motion program is a variable, the location of the variable is the location where the execution environment for the motion program exists, that is, in an application program in a personal computer or in a programmable controller external to the numerical controller.
Such a related art will be described based on drawings. FIG. 3 is a block diagram of a system which executes a related art motion data command method. In the figure, a numeral 1C represents a personal computer or programmable controller, 2C an application program for motion command operating on the personal computer or programmable controller, 3C a specific example of an application program for a motion command, 18C a variable storage memory for storing motion command data, 4C a motion API (Application Programming Interface) called by the application program for a motion command, 5C a bus interface for accessing a bus 21C such as a PCI bus, 19C an application program for a sensor operating on the personal computer or programmable controller, 20C a specific example of the application program for a sensor 19C, 91C a sensor API called by the application program for a sensor 19C, 9Ca sensor interface for input from a sensor 17C, 6C a numerical controller, 7C a bus interface for accessing the bus 21C such as a PCI bus, 8C a motion control processor operating in accordance with given motion command data, 13C a servo amplifier, 14C a servo motor, 15C an encoder, and 16C a motion mechanism.
In the example of the application program 3C in FIG. 3, in steps (1) and (2), the initial values of motion command data are substituted into the variables X, Y present in the variable storage memory 18C in the personal computer or programmable controller 1C.
In step (3), a motion command API whose arguments are variables X, Y is called and a motion command is given to the numerical controller 6C. In this practice, the variables X, Y are converted to immediate values when the motion command API is called. Immediate motion command data is given to the numerical controller 6C. The motion control processor 8C, receiving an immediate motion command, uses the immediate values given to perform motion control.
Then, on an input from the sensor 17C, the input values or values selected by the input values are substituted into the variables X, Y in the variable storage memory 18C by way of the application program for a sensor 18C operating on the personal computer or programmable controller 1C. In FIG. 3, steps (6) through (9) in the specific example 20C are programs to perform this operation.
The application program for a motion command 2C detects that the values of the variables X, Y have been modified in step (4) in the specific example 3C, and uses the modified values of the variables X, Y to call the motion command API whose arguments are variables X, Y again and gives a motion command to the numerical controller 6C.
Next, a second conventional art will be described. According to this example, the I/O for a control program for controlling activation/termination is handled with a control signal definition tool on a personal computer or dedicated engineering tool.
The conventional art technology will be specifically described based on drawings. FIG. 4 is a block diagram of a system which executes a control signal definition method in the related art motion program. In the figure, a numeral 1D represents a personal computer or dedicated engineering tool, 22D I/O definition data for the control signal which defines the association of the operation of activation/termination of the motion program and I/O signals, 24D a specific example of the I/O definition data for the control signal, 23D a tool for setting the I/O definition data for the control signal, 2D a motion program under editing, 3D a specific example of a motion program, 4D a tool for editing the motion program, 5D and 7D communications interfaces for downloading data from a personal computer or dedicated engineering tool 1D to a numerical controller 9, 8D a data storage memory, 82D I/O definition data for the control signal stored in the data storage memory, 81D a motion program stored in the data storage memory, 9D an I/O interface for input/output of an I/O signal, 12D an I/O for the control signal, 11D a motion control processor operating in accordance with the given motion program, 13D a servo amplifier, 14D a servo motor, 15D an encoder, and 16D a motion mechanism.
In the example of the application program 3D in FIG. 4, insteps (1) through (3), a motion command API whose arguments are the variables X1 through X3 and Y1 through Y3 is called and a motion command is given to the numerical controller 9. In this practice, signals for controlling activation/termination of each motion command API are uniformly controlled by a single control command defined in the I/O definition data for the control signal. Thus a control signal cannot be selected individually.
In this way, in the conventional art, in case the value of a variable has changed due to an external cause such as an input signal to a sensor, a motion API must be called by an application program again and a command must be given via a bus such as a PCI bus. This prevents high-speed change of motion operation.
Another problem is that, on top of cumbersome definition of an I/O for the control signal, operation of a multi-series motion programs requires definition of the I/O for the control signal for each series as well as definition on which series the motion program belongs to. This complicates the preparatory stage of a motion program, thus turning the motion program hard to handle.